home *** CD-ROM | disk | FTP | other *** search
- %
- % Environment dependant variables
- %
-
- /@sys_path (system.ps) def
-
- %
- % Initialize the PostScript machinery
- %
-
- (Loading PSI...) print
- @sys_path run
- (Done\n) print
-
- /printpath { /_str 16 string def
- {(Move: )print exch _str cvs print( )print _str cvs print(\n)print}
- {(Draw: )print exch _str cvs print( )print _str cvs print(\n)print}
- {(Curv: )print 6 -2 roll exch _str cvs print( )print _str cvs print
- ( )print 4 -2 roll exch _str cvs print( )print _str cvs print
- ( )print exch _str cvs print( )print _str cvs print(\n)print}
- {(Done:\n)print} pathforall } @bd
-
- %
- % Enter the normal flow
- %
-
- /@inp (%stdin) (r) file def
-
- /@pmt { /@buf 256 string def
- { prompt @inp @buf readline pop cvx exec } loop
- } def
-
- /@execut false def
- /executive { /@execut true def stop
- } @bd
-
- start
-
- @args length 1 eq
- {
- { @inp cvx stopped @execut { clear exit } if
- { /@execut false def errordict /handleerror get exec } if
- } loop
- }
- {
- 1 1 @args length 1 sub
- { @args exch get run } for
- } ifelse
- @execut { @pmt } if
-
- %@args length 1 eq
- %{
- % { @inp cvx stopped @execut { clear exit } if
- % { /@execut false def errordict /handleerror get exec } if
- % } loop
- %}
- %{
- % 1 1 @args length 1 sub
- % { @args exch get {run} stopped
- % { errordict /handleerror get exec exit } if
- % } for
- %} ifelse
- %@execut { @pmt } if
-